<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- public quote -->
<%@include file="/jsp/comm_css_include.jsp"%>
<link rel="stylesheet" type="text/css" href="${basePath}/css/zTreeStyle/zTreeStyle/zTreeStyle.css">
<!doctype html>
<html>
<head>
<style type="text/css">
li{list-style: none;}

</style>
</head>
<body class="gray-bg">
	<input type="hidden" id="receiverIds" />
	<div class="container creditbody">
		 <div class="iboxtitle">
		 	<span><i class="glyphicon glyphicon-map-marker"></i>&nbsp;业务受理>后补资料</span>
         </div>
         <div class="ibox-content ibox-con">
			<form class="form-horizontal" id="commentForm">
				<!-- 业务信息 -->
				<%@include file="/jsp/common_yw_include.jsp"%>
				<div class="business-manwife">备注信息<span style="color:#FC1515;">（先选择通知对象后再提交）</span></div>			
				<div class="business-padding">
				    <table cellpadding="0" cellspacing="0" border="0" class="buyinfor-table">
						<tr>
							<td align="right" valign="">
								<input type="hidden" id="simpleInfoId" name="simpleInfoId"/>
								<label class="control-label np">备注信息：</label>
							</td>
							<td>
								<textarea class="form-control" rows="3" cols="100" id="remarks" name="remarks"></textarea>
							</td>
						</tr>
						<tr>
							<td align="right"> &nbsp; </td>
						</tr>
						<tr>
							<td align="left"> &nbsp; </td>
							<td align="left">
								 <button type="button" class="btn dpbtn_red" onclick="noticePeopel();">选择通知人</button>
								 <button type="button"  class="btn dpbtn_blue" onclick="save();">提交</button>
							</td>
						</tr>
					</table>	
				</div>
			</form>
			<div class="business-manwife">后补资料</div>
			<div class="padding-nono">
				<div class="zx-addimg">
					<ul id="XXX_HOU_BU_ZI_LIAO"></ul>
					<ul id="HOU_BU_ZI_LIAO">
						<li class="firstMuliUploadButton zx-upimg"><img src="${basePath}/img/shangchuanzhaopian.png" width="110px" height="110px" class="zx-imgPre" style="display: block;" />
							<div class="img-layer">
								<div></div>
								<span filelabelLabelSpan="${attachmentLabelNames.HOU_BU_ZI_LIAO_TU_PIAN }">${attachmentLabelNameValues.HOU_BU_ZI_LIAO_TU_PIAN }</span>
							</div> 
							<a href="javascript:;" class="file" onclick="uploadFileClicked(this,'img');" modeId="${modeIDTypeNames.HBZL }" ulId="HOU_BU_ZI_LIAO" customLabel="true" isAdd="true" fileLabelLi="${attachmentLabelNames.HOU_BU_ZI_LIAO_TU_PIAN }" defaltLabelNameLi="${attachmentLabelNameValues.HOU_BU_ZI_LIAO_TU_PIAN }" subId="" ></a>
						</li>
						<li class="firstMuliUploadButton zx-upimg"><img src="${basePath}/img/shangchuanzhaopian.png" width="110px" height="110px" class="zx-imgPre" style="display: block;" />
							<div class="img-layer">
								<div></div>
								<span filelabelLabelSpan="${attachmentLabelNames.HOU_BU_ZI_LIAO_SHI_PLN }">${attachmentLabelNameValues.HOU_BU_ZI_LIAO_SHI_PLN }</span>
							</div> 
							<a href="javascript:;" class="file" onclick="uploadFileClicked(this,'video');" modeId="${modeIDTypeNames.HBZL }" ulId="HOU_BU_ZI_LIAO" customLabel="true" isAdd="true" fileLabelLi="${attachmentLabelNames.HOU_BU_ZI_LIAO_SHI_PLN }" defaltLabelNameLi="${attachmentLabelNameValues.HOU_BU_ZI_LIAO_SHI_PLN }" subId="" ></a>
						</li>
						<li class="firstMuliUploadButton zx-upimg"><img src="${basePath}/img/shangchuanzhaopian.png" width="110px" height="110px" class="zx-imgPre" style="display: block;" />
							<div class="img-layer">
								<div></div>
								<span filelabelLabelSpan="${attachmentLabelNames.HOU_BU_ZI_LIAO_QI_TA }">${attachmentLabelNameValues.HOU_BU_ZI_LIAO_QI_TA }</span>
							</div> 
							<a href="javascript:;" class="file" onclick="uploadFileClicked(this,'img');" modeId="${modeIDTypeNames.HBZL }" ulId="HOU_BU_ZI_LIAO" customLabel="true" isAdd="true" fileLabelLi="${attachmentLabelNames.HOU_BU_ZI_LIAO_QI_TA }" defaltLabelNameLi="${attachmentLabelNameValues.HOU_BU_ZI_LIAO_QI_TA }" subId="" ></a>
						</li>
					</ul>
				</div>
			</div>
		<!-- 当前经办人 -->
	    <%@include file="/jsp/comm_current_person_include.jsp"%>
		</div>
	</div>	
	 
	<!-- public quote -->
    <%@include file="/jsp/comm_js_include.jsp"%>
 	<!-- 文件上传 -->
 	<%@include file="/jsp/common_fileupload_multi_include.jsp"%>
 	<%@include file="/jsp/notice_people_choice.jsp"%> 
    <script type="text/javascript">
	    jQuery(function($) {  
	    	var busiId = $.getUrlData("id");
	    	$('#busiId').val(busiId);
	    	getFujianzil(busiId);
		    getData(busiId);
		    getDataS('a2be6ac69de84ba8bc5d3778c000ecf2,c2e79366a208472998c2fa05bff304bf,297225141ce14dbda97ca5d083293b6a,52d7a2c868f24432ac72b77f8413aae7');
	    });
	    
	    function getFujianzil(busiId){
	    	showAttentment(busiId, null, '${modeIDTypeNames.HBZL }',null,function(){
	    		clearFj();
	   	 	});
	    }	
	    
	    function clearFj(){
	    	$("#HOU_BU_ZI_LIAO").find("li").hide();
	    	$("#HOU_BU_ZI_LIAO").find("li:gt(-4)").show();
	    }
	    
		//展示数据
	    function getData(busiId){
	    	$.dpAjax({
	    		url:'${basePath}/OtherSimpleInfoController/getByBusiId',
	    		data:{busiId:busiId,modeId:'${modeIDTypeNames.HBZL }'},
				success: function(datas){
					var data = datas.result;
					if(data) {  
						$('#remarks').val(data.remarks);
						$('#simpleInfoId').val(data.replaceId);
					}
	             }
	    	 });
	    }
		
	    function save(){
	    	var data = {};
	    	var remarks = $("#remarks").val();
	    	data.remarks = remarks;
	    	if(!remarks || remarks == ""){
	    		layer.msg('备注信息不能为空', {icon: 5});
	    		return;
	    	}
	    	data.busiId = $('#busiId').val();
	    	data.cusId =  $("#customerId").val();
	    	data.modeId =  '${modeIDTypeNames.HBZL }'; //后补资料
	    	data.receiverIds = $("#receiverIds").val(); //通知
	    	var id = $('#simpleInfoId').val();
	    	var url = "${basePath}/OtherSimpleInfoController/savePostSupplement";
	    	data.id = id;
	    	$.dpAjax({
	    		show:true,
	    		url:url,
	    		data:data,
				success: function(datas){
					$('#simpleInfoId').val(datas.result);
					layer.msg('保存成功', {icon: 6,time:1500});
	             }
	    	 });
	    }
	    
	    function noticePeopel(){
			layer.open({
	    	  type: 1,
	    	  title:'选择通知人',
	    	  area: ['410px', '550px'], //宽高
	    	  content: $("#noticeChoice")
	    	})
		}
	    
	  //确定通知人
		function savecachedUsers(){
			$("#receiverIds").val(cachedUsers);
			layer.closeAll();
		}
    </script>
</body>
</html>
